<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>CSS尺寸表示法</title>
		
		<style>
			.d1{
				/*
				
				宽度不写时，默认为父元素的100%
				*/
				height: 100px;
				
				background-color: #f00;
			}
			.d2{
				height: 200px;
				width: 200px;
				border: 2px solid #000;
			}
			
			.d2 img{
				height: 65%;
				width: 100%;
			}
			.d2 p{
				/* 宽度不写时，默认继承父元素的100%*/
				height: 100px;
				background-color: #f00;
			}
			span{
				/* span行内元素的大小是靠内容撑起来的 设置宽高无效*/
				height: 300px;
				width: 300px;
				background-color: #f0f;
			}
			input{
				height: 100px;
				width: 300px;
				font-size: 30px;
			}
			input:focus{
				background-color: aquamarine;
				color: red;
			}
			
			
			
		</style>
	</head>
	<body>
		<div class="d1">132</div>
		<div class="d2">
			<img src="./img/1.jpg" alt="">
			<p></p>
			<span>123</span>
			<input type="text">
		</div>	
		
		
	</body>
</html>